<div class="row-fluid">
    <div class="span12">
        <!-- BEGIN THEME CUSTOMIZER-->

        <!-- END THEME CUSTOMIZER-->
        <!-- BEGIN PAGE TITLE & BREADCRUMB-->
        <div style="clear:both; height:20px"></div>
        <ul class="breadcrumb">
            <li>
                <a href="<?php echo $this->Html->url(array("controller" => "home", "action" => "index")); ?>">Home</a>
                <span class="divider">/</span>
            </li>
            <li class="active">
                <a href="<?php echo $this->Html->url(array("controller" => "home", "action" => "master")); ?>">マスター</a>
                <span class="divider">/</span>
            </li>
            <li class="active">お客様データベース 

            </li>

        </ul>
        <!-- END PAGE TITLE & BREADCRUMB-->
        <div class="row-fluid">
            <div class="span12">


                <!-- BEGIN EXAMPLE TABLE widget-->
                <div class="control-group">
                    <form action="" class="form-horizontal" id="CameraIndexForm" method="get" accept-charset="utf-8">

                        <div class="control-group">
                            <label for="ID" class="control-label">お客様ID</label>
                            <div class="controls required"><input value="<?php if (!empty($_GET['Id'])) echo $_GET['Id']; ?>" name="Id"  class="span4" type="text" id="CameraCamName">
                            </div>
                        </div>    
                        <div class="control-group">
                            <label for="CameraCamName" class="control-label">名前</label>
                            <div class="controls required"><input value="<?php if (!empty($_GET['Name'])) echo $_GET['Name']; ?>" name="Name" class="span4" type="text" id="CameraCamName">
                            </div>
                        </div> 
                        <div class="control-group">
                            <label for="Name" class="control-label">メールアドレス</label>
                            <div class="controls required">
                                <input name="Email"  class="span4" value="<?php if (!empty($_GET['Email'])) echo $_GET['Email']; ?>" type="text" id="CameraId">
                            </div>
                        </div> 
                        <div class="control-group">
                            <label for="Other" class="control-label">他の項目で検索</label>
                            <div class="controls required">
                                <input name="Other"  class="span4" value="<?php if (!empty($_GET['Other'])) echo $_GET['Other']; ?>" type="text" id="CameraId">
                            </div>
                        </div> 
                        <div class="control-group required">
                            <label for="CameraName" class="control-label">
                                <button name="submit" class="btn btn-success" type="submit">
                                    <i class="icon-search icon-white"></i> 検索
                                </button>
                            </label>
                            <div class="controls required">
                            </div>
                        </div>
                    </form>                
                </div>


                <p>
                    <button class="btn btn-warning" onclick="location.href = '<?php echo $this->Html->url(array("controller" => "customer", "action" => "add")); ?>'"><i class="icon-plus icon-white"></i> 新規客様</button>

                </p>
                <div class="widget blue table-fixed-pixel">
                    <div class="widget-title">
                        <h4><i class="icon-reorder"></i> お客様一覧</h4>
                        <span class="tools">
                            <a href="javascript:;" class="icon-chevron-down"></a>

                        </span>
                    </div>
                    <div class="widget-body ">

                        <table class="table table-striped table-bordered " id="sample_1">
                            <thead>
                                <tr>
<!--                                    <th style="width:8px;">&nbsp;</th>-->
                                    <th style="min-width: 70px" class="text-center">お客様ID</th>
<!--                                    <th >会社名</th>-->
                                    <th style="min-width: 150px">担当者名</th>
                                    <th style="min-width: 150px">ふりがな&nbsp;</th>
                                    <th >住所</th>
                                    <th style="min-width: 100px">電話番号</th>
                                    <th >メールアドレス</th>
                                    <th style="min-width: 220px">&nbsp;</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php foreach ($data as $value): ?>
                                    <tr class="odd gradeX">
    <!--                                    <td ><input type="checkbox" value=""></td>-->
                                        <td class="text-center"><?php echo $value['Customers']['CustId'] ?></td>
    <!--                                    <td><?php //echo $value['Customers']['company']  ?></td>-->
                                        <td style="white-space: pre-line;overflow: hidden;text-overflow: ellipsis;max-width: 170px"><?php echo $value['Customers']['CustName'] ?></td>
                                        <td style="white-space: pre-line;overflow: hidden;text-overflow: ellipsis;max-width: 150px"><?php echo $value['Customers']['CustFurigana'] ?></td>
                                        <td style="white-space: pre-line;overflow: hidden;text-overflow: ellipsis;max-width: 300px"><?php echo $value['Customers']['CustAddress'] ?></td>
                                        <td class="hidden-phone"><?php echo $value['Customers']['CustPhone'] ?></td>
                                        <td class="hidden-phone"><?php echo $value['Customers']['Email'] ?></td>
                                        <td >
                                            <div  style="margin-top:3px;display: inline"><i class="icon-map-marker"></i> 
                                                <a style="cursor:pointer" data-address="<?php echo $value['Customers']['CustAddress'] ?>" class="view_map">View map</a>
                                            </div>
                                            <div class="btn btn-primary">
                                                <a  href="<?php echo $this->Html->url(array("controller" => "customer", "action" => "edit", $value['Customers']['Id'])); ?>" >
                                                    <i class="icon-pencil icon-white"></i>編集
                                                </a>
                                            </div>&nbsp;
                                            <!--<button onclick="location.href='<?php echo $this->Html->url(array("controller" => "customer", "action" => "edit", $value['Customers']['Id'])); ?>'" class="btn btn-primary"><i class="icon-pencil icon-white"></i> 編集</button>-->
                                            <div class="btn btn-danger">
                                                <a href="<?php echo $this->Html->url(array("controller" => "customer", "action" => "delete", $value['Customers']['Id'])); ?>" >
                                                    <i class="icon-remove icon-white"></i> 削除
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                <?php endforeach; ?>
                            </tbody>
                        </table>
                    </div>
                </div>
                <!-- END EXAMPLE TABLE widget-->


            </div>
        </div>
    </div>

</div>